<template>
  <div class="computer-box">
    <div>
      <input type="number" v-model="addNum1"> + <input type="number" v-model="addNum2"> <button style="width: 30px;" @click="setResult">=</button>
      <div class="result-box">{{ result }}</div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        addNum1: null,
        addNum2: null,
        result: ''
      }
    },
    methods: {
      setResult() {
        this.result = Number(this.addNum1) + Number(this.addNum2) 
      }
    }
  }
</script>

<style lang="scss" scoped>
.computer-box{
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  .result-box{
    font-size: 140px;
    height: 150px;
    text-align: center;
  }
}
</style>